package com.gxa.meiye.core.common;

/**
 * Created with IntelliJ IDEA.
 * User: chen
 * Date: 2021/11/30 12:45
 * Description:
 * Version: V1.0
 */
public class ResponseData<T> {
    private int code;//返回的状态码
    private String msg;//返回的消息
    private T data;//返回的数据(Map、List、String......)
    private String token;// 返回token
    private Integer count;//返回总条数

    public ResponseData() {
    }

    public ResponseData(int code, String msg, T data, String token) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.token = token;
    }

    public ResponseData(int code, String msg, T data, String token, Integer count) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.token = token;
        this.count = count;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", token='" + token + '\'' +
                ", count=" + count +
                '}';
    }
}
